Repository navigation
Add a Windows installer, built and checked in CI - #108
Merged
Merged
Conversation
packaging/windows/disktree.iss builds disktree-<version>-<arch>-windows- setup.exe from the release binary. It installs for the current user with no UAC prompt by default (the first page offers all users), adds a Start menu entry, a desktop shortcut and an uninstaller in Settings > Apps, and upgrades in place, keyed by a fixed AppId. x86_64 and aarch64 each get their own setup. Verified with Inno Setup 7.1.0 on Windows 11 x64: ISCC compiles cleanly; leaving out /DArch or passing an unknown one aborts the compile; a silent /CURRENTUSER install creates the exe, both shortcuts and the uninstall entry, and disktree launches; a second install upgrades with one uninstall entry; unins000.exe removes all of it including the install folder.
The windows release job installs Inno Setup 7.1.0 from its GitHub release, checked against a pinned SHA256 (the runners carry 6.7.1 and 6.6.1), compiles packaging/windows/disktree.iss for the job's architecture, and uploads the setup with a sha256 file in the same format as the zip's. Verified: the pinned hash is of the downloaded installer, whose Authenticode signature is valid; the workflow parses. Not yet run in Actions.
README: the setup is the default Windows download, per-user unless all users is chosen, unsigned so SmartScreen needs More info then Run anyway; the zip remains. AGENTS.md: how to compile the setup locally, and that its AppId must never change. Verified: cargo xtask lint is green.
CI compiled nothing of the installer, so a broken disktree.iss would first fail inside a release, after its draft exists, and the Arm64 setup had never been built at all. The Windows job now compiles the x64 setup and the Windows aarch64 job the Arm64 one; both run check-setup.ps1, which installs it silently for the current user, checks the exe, Start menu and desktop shortcuts and the uninstall entry, installs again as an upgrade (one entry left), uninstalls and checks nothing remains. install-inno.ps1 takes over the pinned, hash-checked Inno Setup install from release.yml and now fails on a non-zero installer exit or a missing ISCC.exe instead of leaving the next step to report it. Verified locally on Windows 11 x64: both scripts pass, and the CI Installer step body, run as written, compiles a 0.0.0 setup and reports "setup installs, upgrades and uninstalls cleanly". Upgrading while disktree runs closes it through Restart Manager without a reboot. The Arm64 job has not run yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows releases ship only a zip, so
disktree.exeends up running out ofDownloads or wherever it was unpacked, with no Start menu entry and nothing
in Settings > Apps to remove it. This adds a setup program per architecture,
next to the zip, which stays:
disktree-<version>-x86_64-windows-setup.exedisktree-<version>-aarch64-windows-setup.exeEach installs disktree, adds a Start menu entry and a desktop shortcut,
registers an uninstaller in Settings > Apps, and upgrades in place.
How
packaging/windows/disktree.iss: an Inno Setup 7 script, besidepackaging/macos/. It takes/DAppVersionand/DArchand aborts thecompile if either is missing or unknown.
UAC prompt, the way
make installuses~/.local. Its first page offersall users instead (
PrivilegesRequiredOverridesAllowed=dialog).AppId. It is how upgrades and the uninstaller find anexisting install, so like the macOS bundle identifier it must not change;
AGENTS.md says so.
%APPDATA%(power.rs), and Restart as Administrator usescurrent_exe()(access.rs).packaging/windows/install-inno.ps1installsInno Setup 7.1.0 from its GitHub release, checked against a pinned
SHA256. The runners' own copies are older and differ: 6.7.1 on
windows-2025, 6.6.1 on windows-11-arm. The script fails on a hash
mismatch, a non-zero installer exit or a missing
ISCC.exe.release.yml: the Windows job compiles the setup for itsarchitecture and uploads it with a
.sha256in the same format as thezip's.
ci.yml: the Windows job compiles the x64 setup and the Windowsaarch64 job the Arm64 one, so a broken script fails the pull request
rather than a release halfway through. Both then run
packaging/windows/check-setup.ps1. It installs silently, checks theexe, both shortcuts and the uninstall entry, and installs again as an
upgrade, expecting one entry. It then uninstalls and checks that nothing
is left.
The setup is not signed. README tells users that SmartScreen will say
"Windows protected your PC" and to choose More info, then Run anyway.
Signing, winget and an Open with entry for folders are left for later.
Verified
On Windows 11 x64, with Inno Setup 7.1.0:
/DArch,or passing an unknown one, aborts with the script's message.
%LOCALAPPDATA%\Programs\disktree, with both shortcuts and an entrynamed "disktree 0.11.0", and disktree launches.
Manager and replaces it with no reboot, leaving one uninstall entry.
check-setup.ps1and the CI step body, run as written, pass.cargo xtask lintis green. No Rust code changed.The Arm64 setup has not been run on Arm64 hardware; the windows-11-arm CI
job is its first run.